import request from '@/utils/request'

// 查询采集绑定列表
export function listBind(query) {
  return request({
    url: '/collect/bind/list',
    method: 'get',
    params: query
  })
}

// 查询采集绑定详细
export function getBind(bindId) {
  return request({
    url: '/collect/bind/' + bindId,
    method: 'get'
  })
}

// 新增采集绑定
export function addBind(data) {
  return request({
    url: '/collect/bind',
    method: 'post',
    data: data
  })
}

// 修改采集绑定
export function updateBind(data) {
  return request({
    url: '/collect/bind',
    method: 'put',
    data: data
  })
}

// 删除采集绑定
export function delBind(bindId) {
  return request({
    url: '/collect/bind/' + bindId,
    method: 'delete'
  })
}

// 根据站点ID获取绑定列表
export function getBindsBySiteId(siteId) {
  return request({
    url: '/collect/bind/site/' + siteId,
    method: 'get'
  })
}

// 自动绑定类型
export function autoBindTypes(siteId) {
  return request({
    url: '/collect/bind/auto/' + siteId,
    method: 'post'
  })
}

// 清除站点绑定
export function clearBindings(siteId) {
  return request({
    url: '/collect/bind/clear/' + siteId,
    method: 'delete'
  })
}